package com.dex4d.update;

import android.text.TextUtils;

/**
 * 作者    LiQingyi
 * 时间    2018/12/4 14:34
 * 文件    dex4d-android
 * 描述
 */
public class AppUpdate {

    /**
     * version : v0.9.108
     * lowest_version : v0.9.65
     * url : http://106.75.25.3:8089/version/android/dex4d-app-v0.9.108_pack.apk
     * md5 : faed498637a2b5f21249154febf8d630
     * info : http://106.75.25.3:8089/version/android/dex4d-app-v0.9.108_upinfo.txt
     */

    public String version;
    public String lowest_version;
    public String url;
    public String md5;
    public String info;

    public boolean isUpdate(String localVersion) {
        return !TextUtils.equals(localVersion, version);
    }

    @Override
    public String toString() {
        return "AppUpdate{" +
                "version='" + version + '\'' +
                ", lowest_version='" + lowest_version + '\'' +
                ", url='" + url + '\'' +
                ", md5='" + md5 + '\'' +
                ", info='" + info + '\'' +
                '}';
    }
}
